Skip to content

Add Homepluscontrol integration#46783

Merged
MartinHjelmare merged 31 commits into
home-assistant:devfrom
chemaaa:homepluscontrol
Mar 25, 2021
Merged

Add Homepluscontrol integration#46783
MartinHjelmare merged 31 commits into
home-assistant:devfrom
chemaaa:homepluscontrol

Conversation

@chemaaa
Copy link
Copy Markdown
Contributor

@chemaaa chemaaa commented Feb 19, 2021

Proposed change

This adds the Legrand Home+ Control integration to the Home Assistant core. This integration connects Home Assistant to the Legrand API that can manage "Legrand/Bticino with Netatmo" products. This API is one of several that Legrand exposes through their "Works with Legrand" platform: https://developer.legrand.com/

In this initial PR, the integration adds a simple switch entity to represent the in-wall switches and power outlets that are part of this Legrand smart home product range.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
home_plus_control:
  client_id: YOUR_CLIENT_ID
  client_secret: YOUR_CLIENT_SECRET
  subscription_key: YOUR_SUBSCRIPTION_KEY

Additional information

The integration uses cloud-polling with a single API poll to fetch the data of all entities.
Authentication follows an oauth2 exchange.
The Legrand API only allows 500 API calls per day, so this is catered for in the configuration of the integration - refresh intervals have default values that are larger than ideal, but are currently the best possible to prevent reaching daily quota limitations. In any case, these intervals are configurable in the integration.

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥇 Gold
  • 🥈 Silver
  • 🏆 Platinum

To help with the load of incoming pull requests:

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants